//
//  PlaceHolderTextField.m
//  maipu-wlan-guest
//
//  Created by FranklinPhill on 15/5/29.
//  Copyright (c) 2015年 maipu. All rights reserved.
//

#import "PlaceHolderTextField.h"

@implementation PlaceHolderTextField

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (CGRect)placeholderRectForBounds:(CGRect)bounds {
    //return CGRectInset(bounds, 20, 0);
    CGRect inset = CGRectMake(bounds.origin.x, bounds.origin.y + 7, bounds.size.width -10, bounds.size.height);//更好理解些
    return inset;
}

- (void)drawPlaceholderInRect:(CGRect)rect {
    [[UIColor whiteColor] setFill];    //设置placeHolder颜色为white
    [[self placeholder] drawInRect:rect withFont:[UIFont systemFontOfSize:14.f]];
}

@end
